import java.util.ArrayList;
import java.util.List;

public class Test2 {
    public static void main(String[] args) {
         String str1 = "welcome to ctve";
         String str2 = "come";
         List<Character> list1 = fun(str1,str2);
         //System.out.println(list1);
         for(Character c :list1){
             System.out.print(c);
         }
     }

    public static List<Character> fun(String str1, String str2) {
        List<Character> list1 = new ArrayList<>();
        for(int i = 0;i < str1.length();i++) {
            char ch = str1.charAt(i);
            if(!str2.contains(ch + "")){
                list1.add(ch);
            }
        }
        return list1;
    }
}
